import 'package:series_play/comm/base/user_manager.dart';
import 'package:get/get.dart';
import 'package:series_play/pages/account/account_login_page.dart';
import 'package:series_play/pages/mine/wallet/wallet_page.dart';
import 'package:series_play/pages/search/search_page.dart';
import 'package:series_play/route/route_path.dart';

class JumpHelper {
  JumpHelper._();

  static logout() {
    UserManager.logout();
    // 一直退出栈中页面直到回到主页
    Get.until((route) => route.settings.name == RoutePath.main);
  }

  static login() {
    Get.toNamed(RoutePath.quickLogin);
  }

  static accountLogin() {
    Get.to(() => AccountLoginPage());
  }

  static search() {
    Get.to(() => SearchPage());
  }

  static wallet(){
    Get.to(() => WalletPage());
  }
}

